package cn.ahut.test1;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringTest1 {
	@Test
	public void test(){
		Car car = new BMW();
		car.userCar();
	}
	
	@Test
	public void test1(){
		ApplicationContext application =
				new ClassPathXmlApplicationContext("applicationContext.xml");
		Car car = application.getBean("car", Car.class);
		car.userCar();
	}
	
}
